package buisness.local.hibernate.dao.impl;

import java.util.List;

import org.hibernate.SessionFactory;

import buisness.local.hibernate.dao.IFansubDao;
import buisness.local.hibernate.model.Fansub;
import buisness.local.hibernate.util.HibernateUtil;

public class FansubDao implements IFansubDao{

	@Override
	public List<Fansub> list() {
		SessionFactory sf = HibernateUtil.getSessionFactory();
		sf.getCurrentSession().beginTransaction();
		List<Fansub> resultado = (List<Fansub>) sf.getCurrentSession().createQuery("SELECT a FROM Fansub a").list();
		return resultado;
	}

}
